const e = React.createElement;

function LikeButton() {
    let isLike = false;

    const options = {
        style: {
            width: "120px",
            height: "40px",
            borderRadius: "8px",
        },
        onClick: function () {
            const btn = document.querySelector("button");
            isLike = !isLike;
            if (isLike) {
                btn.innerHTML = "Unlike";
                btn.style.background = "#ef6565";
            } else {
                btn.innerHTML = "Like";
                btn.style.background = "#ffffff";
            }
        },
    };

    return e("button", options, "Like");
}

ReactDOM.render(e(LikeButton), document.getElementById("app"));
